package string;

public class Substring1 {
    public static void main(String[] args) {
        String str = "www.google.com";
        int starts = str.indexOf(".")+1;
        int ends = str.indexOf(".",starts);
        String name = str.substring(starts,ends);
        System.out.println(name);
    }
}
